package org.shj.flink.transform;

import org.apache.flink.api.common.functions.MapFunction;
import org.shj.flink.dto.SourceStaffDTO;
import org.shj.flink.dto.TargetStaffDTO;

/**
 *
 * @author Shen Huang Jian
 * @date 2020-08-05 17:14
 */
public class MyCustomizeTransform implements MapFunction<SourceStaffDTO, TargetStaffDTO> {

    @Override
    public TargetStaffDTO map(SourceStaffDTO value) throws Exception {
        TargetStaffDTO staffDTO = new TargetStaffDTO();
        staffDTO.setName(value.getName());
        staffDTO.setBirth(value.getBirthday());
        return staffDTO;
    }
}
